home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
101-125
/
scopedisk116
/
magman
/
magman.doc
< prev
next >
Wrap
Text File
|
1995-03-19
|
10KB
|
211 lines
MAGMAN.DOC
MagMan is a Magazine Article Manager.
MagMan Version 2.02 was written March 1990
by Mike Budahn, Virginia Beach, VA
for the Commodore Amiga computer.
This program was originally called MAGGREP, since it grew out of my
experimentation with the GREP utility. I've change the name for purely
aesthetic reasons. MAGMAN is Copyright 1990 by Mike Budahn.
This archive file contains:
MAGMAN.DOC - this documentation file
MAGMAN.PW - Power Windows(tm) file (not up-to-date)
MANMAN.C - source file
MAGMAN.H - header file
MAGMAN - executable file
Database - a sample database
MAGMAN.info - icon to start MAGMAN from WorkBench
Database.info - icon for the database
MAGMAN.DOC.info- icon for the documentation file
By setting the default tool of the Database.info and Doc.info icons
to the location of your text reader, you can view the documentation
or your database simply byclicking on these icons.
MAGMAN is being placed in the public domain via the Nexus and Lattice
Bulletin Board services. This program may be freely used provided no
subsequent versions are released without the expressed, written consent
of the author. MagMan may be freely distributed provided the executable,
source, and documentation files remain intact together.
Under no circumstances may anyone monitarily profit from this program.
MagMan is free.
MagMan is being offered to the Amiga community for the utilitarian purpose
it serves, and also as a tutorial for those seeking to learn more about
the Amiga computer or C programming language.
Neither the author nor the Bulletin Board services may be held liable for
any errors in programming or statement, and the user is solely responsible
for damages which may be incurred by using this program. The author is
not obligated to add to, enhance, or correct this program.
Use of this program for the purpose of transporting any foreign code,
including but not limited to viruses, trojans, or any other functions not
in keeping with the intent of this program, damages the reputation of the
author, Commodore, the Bulletin Board services, and the computer industry
in general. Any person or persons using this program for such purposes
will be held liable by the author and any other party or parties who may
seek litigation.
I buy every Amiga magazine I can find, and after spending countless
hours flipping through them to find some programming technique that would
solve a problem, or some review about a product I wanted to buy, I decided
I needed something to help me find topics quickly. Rather than buy a
database program, which would do the same thing, I took this need as a
good excuse to write a C program.
I've been learning C for several years. I've read the learning curve
for C on the Amiga is steep, and it is, but it's not that hard. My
difficulty has been finding program examples. So many magazines are
oriented toward reviews. The best source of code I've found are the
public domain files on BBS's.
So here's mine, as it is. I hope MagMan solves a problem for you,
either organizing your articles or furthering your programming skills.
I'd just like to say thanks to Commodore for building my dream machine,
to Lattice for excellent support, to Nexus for all the sharing, and
especially to those programmers who've unselfishly offered their code
to all.
***********************************************************************
INSTALLATION:
MagMan assumes it will find a file called DATABASE on a volume called
MAG:. In my setup (a two disk system), I simply formatted a floppy disk,
labeled it MAG, and placed MAGMAN on it. Then to start the program I just
type RUN MAG:MAGMAN. If the DATABASE file is not found, MAGMAN makes it.
Obviously, if you try to search a DATABASE file that doesn't exist, you'll
get an error message.
You hard disk users probably know what to do already. You can place
MAGMAN anywhere, and assign MAG to wherever it is. You've got aliases
and script files to play with. The important point is to have the program
and database together on a real or assigned volume called MAG.
INNERDS:
MagMan opens its own window, which contains 3 menu selections (with
alternate command keys), 3 data entry gadgets, and 1 search gadget.
The Add Item and Find Item menu selections serve to activate the
Magazine Title or Keyword Search gadgets, placing the cursor there for
you so you don't have to click the mouse. Once a gadget is activated,
it remains activated until the ENTER key is pressed on the keyboard or a
mouse button is clicked. This means that if you are in data entry mode,
you cannot switch directly to search mode from the keyboard. Although
MagMan will appear to set up the proper mode, your next keypress will still
occur in the gadget you were last in.
There are three ways to handle this. If you are in data entry mode
and want to switch to search mode, you can merely press ENTER until you get
past the Keywords gadget. No gadgets are activated after the Keywords
gadget is passed. Then AMIGA-F will set up properly. If you are in search
mode and want to switch to data entry mode, just press ENTER when the find
gadget is empty. No search will occur, no gadgets will be active, and key
commands will work again.
Second, you can just click in the appropriate gadget. MagMan figures
the mode you're in by the status of text in the various gadgets. It will
not search if search text is unspecified, and it will not save if any data
gadgets are empty.
Third, you can select your mode from the menu. The right mouse button
deactivates gadgets, and sets all modes properly.
ADDING ITEMS:
Hold down the right Amiga key and press A (for Add An Item). All
gadgets will clear, and your cursor will be placed in the Title gadget.
Type the magazine title, and press ENTER. Your cursor will move to the
Issue gadget. Type in the issue, and press ENTER. Your cursor will move
to the Keywords gadget.
NOTE: The Title and Issue gadgets are as wide as they appear on the screen.
The Keywords gadget is wider than it appears. You can type over 200
characters in the gadget. I've found that to be enough for my purposes.
If it's not enough for yours, you can always make multiple magazine
entries. In other words, there's no harm having the same magazine or
issue twice.
VERY IMPORTANT: The Find function assumes your keywords or phrases are
separated by commas. It further assumes that a space follows a comma.
I've done it this way because, here in America, we always follow commas
with a space. So as you enter keywords/phrases, type:
FIRST KEYWORD, NEXT KEYWORD, FINAL KEYWORD(enter)
After you type the keywords and press enter, your cursor goes away.
Normally at this point, you'll hold down the right Amiga key and press S
(for SAVE THIS ITEM). Your data will be appended to the DATABASE file.
If you make an error in any previous gadget, just click in the gadget
and edit the error.
Repeat the process for the next data item... select AMIGA-A, enter the
title, enter the issue, enter the keywords (separated by a comma and a
space), then AMIGA-S to save, then repeat.
Your data is saved as ASCII in the file, so even in the worst case
scenario, you can easily edit the data with a text processor.
It is also recommened that you make no single keyword entry longer
than the keyword gadget. Although you can type in over 200 characters in
the keyword gadget, the function that displays the results of your search
allows no scrolling through the gadget. So if your phrase is longer than
the keyword gadget, you won't be able to see it all.
SEARCHING:
To find something, simply click your mouse in the Find gadget, type
in the text to search for, and press ENTER. Immediately MagMan will first
verify that you did in fact type something in the gadget, then it will
begin the search. If a match is found, the data will be displayed in the
window, and the program will wait for a key press (a "vanilla key.") Some
keys are not legitimate, but any character key or the ENTER key will
work. If you find the item you want, and wish to discontinue searching,
just press the ESCape key in the upper left corner of your keyboard.
Version 2.01 added a Find menu selection, recognizing the alternate
key command RIGHT AMIGA-F.
EXITING:
To quit the program, click the close window gadget.
VER.2.1 LESSON...
I work almost exclusively in the CLI, so it was some weeks before
I realized that MAGMAN opened an ugly console window on the WorkBench.
Lattice allows us to remove that window, so long as the program handles
all output. Typical Amiga C code has you opening libraries like:
if (!(IntuitionBase=OpenLibrary("intuition.library",0))) {
printf("can't open intuition") ;
closeall() ;
}
That printf function is one that must be done through a console. If
you run the program from the CLI, there's no problem -- the CLI IS your
output console. For WorkBench, that won't do.
For this version, I simply removed the printf's, all of which occurred
during startup, so, if Intuition can't be found, etc., the program simply
exits. This shouldn't be a problem for any setups. The exception is if
you're low on RAM, and there's not enough room for MAGMAN's window. Then
the program will exit, and you may not realize why.
Programming-wise, to remove the console window for WorkBench, simply
change your function VOID main() to VOID _main(). At the same time, be
sure to change any function exit() to _exit().
VER.2.2 LESSON...
When creating string gadgets, be careful the gadget accepts no more
characters than you have buffer for. I had goofed by specifying a keyword
buffer of 216 characters, but the gadget could take in 255. Consequently,
the 217th character would spill into some other memory area. This is a
novice mistake; not the first for me.